import 'package:equatable/equatable.dart';
import 'package:website.core/core/domain/entities/access_credentials.dart';
import 'package:website.core/core/domain/entities/user.dart';

class UserContent extends Equatable {
  const UserContent({
    this.accessCredentials,
    this.user,
  });

  final AccessCredentials? accessCredentials;
  final User? user;

  @override
  List<Object?> get props {
    return [
      accessCredentials,
      user,
    ];
  }

  UserContent copyWith({
    AccessCredentials? Function()? accessCredentials,
    User? Function()? user,
  }) {
    return UserContent(
      accessCredentials: accessCredentials == null ? this.accessCredentials : accessCredentials(),
      user: user == null ? this.user : user(),
    );
  }
}
